package com.lwz.startdemo

import android.util.Log
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent

/**
 * @Description: 类作用描述
 * @Author: chad
 * @CreateDate: 2025/5/15 20:19
 * @Version: 1.0
 */
class MyObserver(val lifecycle: Lifecycle): LifecycleObserver {
    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    fun onStart(){
        Log.i("ycg","onStart")
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    fun onStop(){
        Log.i("ycg","onStop")
    }

}